<%@ page language="java" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="com.frogs.framework.web.filter.SpringWebContext,com.frogs.framework.component.cache.Cache,
com.frogs.framework.web.filter.*,
com.frogs.system.util.GoodsEvaluateEnum,
com.frogs.framework.util.StringUtil,
com.frogs.ucenter.util.*" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>刷新评论</title>
</head>
<body>
<%
Cache cache = (Cache)SpringWebContext.getSpringContext().getBean("xmemcached");

for(int i=0;i<=43220;i++){
	System.out.println("flesh evaluate cache , "+i);
	clear(cache , i);
}
%>
<%!
public void clear(Cache cache ,int i){
	clearCache(cache ,i, GoodsEvaluateEnum.SORT_COMBINATION.getId());
	clearCache(cache ,i, GoodsEvaluateEnum.SORT_CREATE_TIME.getId());
	clearCache(cache ,i, GoodsEvaluateEnum.SORT_PRAISE.getId());
	clearCache(cache ,i, GoodsEvaluateEnum.SORT_PHARMACIST.getId());
	clearCache(cache ,i, GoodsEvaluateEnum.SORT_RECOMMEND.getId());
	try{
		Thread.sleep(1000);
	}
	catch(Exception e){
		
	}
}

private void clearCache(Cache cache ,int i,int id){
	StringBuilder mapKey = new StringBuilder();
	mapKey.append(DataCacheKey.goodsEvaluateMapKey);
	mapKey.append("_GOODS_").append(i);
	mapKey.append("_SORT_").append(id);
	if(!StringUtil.isEmpty(cache.get(mapKey.toString())))
		cache.remove(mapKey.toString());
}
%>
</body>
</html>